import PropTypes from 'prop-types'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
function IconButton2({
  icon,children,iconAtFront,iconColor,style,className,onClick
}) {
  return <button style={style} className={className} onClick={onClick}>
    {iconAtFront && <FontAwesomeIcon icon={icon} style={{color:iconColor}}/> }
    
  </button>
}
IconButton2.propTypes = {
  icon: PropTypes.oneOfType([
    PropTypes.string||PropTypes.array
  ]).isRequired,
  children: PropTypes.string,
  iconAtFront: PropTypes.bool,
  iconColor: PropTypes.string,
  style: PropTypes.object,
  className: PropTypes.string,
  onClick: PropTypes.func
}
IconButton2.defaultValues = {
  iconAtFront: true
}
export default IconButton2